package com.test.spring2025_3_31.Listener;

import com.test.spring2025_3_31.Constants.Constants;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class DirectRabbitListener {

    @RabbitListener(queues = Constants.DIRECT_QUEUE1)
    public void directListener1(String message) {
        log.info(Constants.DIRECT_QUEUE1 + "接收：" + message);
    }

    @RabbitListener(queues = Constants.DIRECT_QUEUE2)
    public void directListener2(String message) {
        log.info(Constants.DIRECT_QUEUE2 + "接收：" + message);
    }
}
